﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FreedBack;
using FreedBack.Controllers;

namespace FreedBack.Tests.Controllers
{
    [TestClass]
    public class HomeControllerTests
    {
        private const string ControllerName = "Home";

        [TestMethod]
        public void IncomingRoutesWorkCorrectly()
        {
            "~/".AssertThatRoutesTo(ControllerName, "Index");
            "~/Home".AssertThatRoutesTo(ControllerName, "Index");
            "~/Home/Index".AssertThatRoutesTo(ControllerName, "Index");
            "~/Home/ProvideFeedback".AssertThatRoutesTo(ControllerName, "ProvideFeedback");
            "~/Home/InvalidRoute".AssertThatRouteToFails();
        }

        //[TestMethod]
        //public void Index()
        //{
        //    // Arrange
        //    HomeController controller = new HomeController();

        //    // Act
        //    ViewResult result = controller.Index() as ViewResult;

        //    // Assert
        //    Assert.AreEqual("Welcome to ASP.NET MVC!", result.ViewBag.Message);
        //}

    }
}
